package cn.net.xyan.easy.webapp.base.service.impl;

import cn.net.xyan.easy.webapp.base.dao.ArchiveDao;
import cn.net.xyan.easy.webapp.base.entity.Archive;
import cn.net.xyan.easy.webapp.base.service.IArchiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by xiashenpin on 16/1/17.
 */
@Service
public class ArchiveServiceImpl implements IArchiveService {

    @Autowired
    ArchiveDao archiveDao;

    @Override
    public Archive find(String key) {
        if (key == null)
            return null;
        Archive archive = archiveDao.findOne(key);
        if (archive == null){
            archive = archiveDao.findOne(key);
        }
        return archive;
    }
}
